package com.example.demo.niuke;

/**
 * @Description:
 * @Author: LLL
 * @Date: 2020-03-18 23:09
 **/

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main10 {

    public static void main(String[] args) throws IOException {
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        String s = bf.readLine();
        Integer a = Integer.parseInt(s);
        String binStr = Integer.toBinaryString(a);
        String[] arr = binStr.split("");
        int count = 0;
        for (String ss : arr) {
            if (ss.equals("1"))
                count++;
        }
        System.out.println(count);
    }
}
